package com.hong.utils.executors;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @Auther: Administrator
 * @Date: 2018/7/27 22:17
 * @Description:
 */
public class ExecutorServiceExample5 {

    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(5);

        threadPoolExecutor.execute(()-> System.out.println("I will be process of triggered the execute."));
        threadPoolExecutor.getQueue().add(()-> System.out.println("I am added directlly into the queue."));


    }
}
